CSharpTest.Net
Warning(Exception,String,Object[]) Method
See Also  Example Send Feedback Download Help File
CSharpTest.Net.Logging Assembly > (Global) Namespace > Log Class > Warning Method : Warning(Exception,String,Object[]) Method

e
format
args

Glossary Item Box

Logs a Warning

Syntax

Visual Basic (Declaration) 
Public Overloads Shared Sub Warning( _
   ByVal e As Exception, _
   ByVal format As String, _
   ByVal ParamArray args() As Object _
) 
C# 
public static void Warning( 
   Exception e,
   string format,
   params object[] args
)

Parameters

e
format
args

Example

Log/Test/NegativeTests.cs

C#Copy Code
IDisposable disp = Log.AppStart(null);
disp.Dispose();
disp.Dispose();
foreach( string format in badFormats )
    Log.AppStart(format, i_blow_up).Dispose();

disp = Log.Start(null);
disp.Dispose();
disp.Dispose();
foreach (string format in badFormats)
    Log.AppStart(format, i_blow_up).Dispose();

foreach (string format in badFormats)
    Log.Write(format, i_blow_up);

foreach (string format in badFormats)
    Log.Critical(format, i_blow_up);
foreach (string format in badFormats)
    Log.Critical(i_blow_up, format, i_blow_up);
Log.Critical(i_blow_up);

foreach (string format in badFormats)
    Log.Error(format, i_blow_up);
foreach (string format in badFormats)
    Log.Error(i_blow_up, format, i_blow_up);
Log.Error(i_blow_up);

foreach (string format in badFormats)
    Log.Warning(format, i_blow_up);
foreach (string format in badFormats)
    Log.Warning(i_blow_up, format, i_blow_up);
Log.Warning(i_blow_up);

foreach (string format in badFormats)
    Log.Info(format, i_blow_up);
foreach (string format in badFormats)
    Log.Info(i_blow_up, format, i_blow_up);
Log.Info(i_blow_up);

foreach (string format in badFormats)
    Log.Verbose(format, i_blow_up);
foreach (string format in badFormats)
    Log.Verbose(i_blow_up, format, i_blow_up);
Log.Verbose(i_blow_up);
VB.NETCopy Code
Dim disp As IDisposable = Log.AppStart(Nothing)
disp.Dispose()
disp.Dispose()
For Each format As String In badFormats
    Log.AppStart(format, i_blow_up).Dispose()
Next

disp = Log.Start(Nothing)
disp.Dispose()
disp.Dispose()
For Each format As String In badFormats
    Log.AppStart(format, i_blow_up).Dispose()
Next

For Each format As String In badFormats
    Log.Write(format, i_blow_up)
Next

For Each format As String In badFormats
    Log.Critical(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Critical(i_blow_up, format, i_blow_up)
Next
Log.Critical(i_blow_up)

For Each format As String In badFormats
    Log.[Error](format, i_blow_up)
Next
For Each format As String In badFormats
    Log.[Error](i_blow_up, format, i_blow_up)
Next
Log.[Error](i_blow_up)

For Each format As String In badFormats
    Log.Warning(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Warning(i_blow_up, format, i_blow_up)
Next
Log.Warning(i_blow_up)

For Each format As String In badFormats
    Log.Info(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Info(i_blow_up, format, i_blow_up)
Next
Log.Info(i_blow_up)

For Each format As String In badFormats
    Log.Verbose(format, i_blow_up)
Next
For Each format As String In badFormats
    Log.Verbose(i_blow_up, format, i_blow_up)
Next
Log.Verbose(i_blow_up)

Requirements

Target Platforms: Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7

See Also

Generated with Document! X 2011 by Innovasys